package com.qfmy.controller.common;

import com.qfmy.service.common.UserSignInService;
import com.qfmy.vo.common.UserSignInVo;
import common.result.Result;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 清风明月
 * @Package com.qfmy.controller.common
 * @date 2025/5/18
 * @description 签到表
 */
@RestController
@SuppressWarnings("all")
@RequestMapping("/app/signIn")
public class UserSignInController {
    /**
     * 注入service
     */
    @Resource
    private UserSignInService signInService;

    /**
     * 签到
     */
    @RequestMapping("/addsignIn")
    public Result signIn() {
        signInService.signIn();
        return Result.ok();
    }

    /**
     * 判断当天是否签到
     */
    @RequestMapping("/isSignIn")
    public Result<UserSignInVo> isSignIn() {
        UserSignInVo userSignInVo = signInService.isSignIn();
        return Result.ok(userSignInVo);
    }

}
